#include "power_n.h"
template <typename T> T power_n(T base, const unsigned expo) {
    if (expo == 0)
        return 1;
    if (expo == 1)
        return base;
    if (expo % 2 == 0)
        return power_n(base, expo >> 1) * power_n(base, expo >> 1);
    else
        return power_n(base, expo >> 1) * power_n(base, expo >> 1) * base;
}
template double power_n<double>(double, const unsigned);
template float power_n<float>(float, const unsigned);
template int power_n<int>(int, const unsigned);
